<template>
	<view>
		<map name="" class="map" :latitude="latitude" :longitude="longitude" :markers="covers" @markertap="tapMaker"></map>
	</view>

</template>

<script>
	export default {
		name: "map",
		props: {
			latitude: {
				default: 39.909,
				typeof: Number
			},
			longitude: {
				default: 116.39742,
				typeof: Number
			},
			covers: {
				default: [{
						id: 0,
						latitude: 39.909,
						longitude: 116.39742,
						iconPath: '/static/img/covers_icon.png',
						width: 40,
						height: 40,
					},
					{
						id: 1,
						latitude: 39.90,
						longitude: 116.39,
						iconPath: '/static/img/covers_icon.png',
						width: 40,
						height: 40,
					}
				],
				typeof: Array
			}
		},
		data() {
			return {

			};
		},
		methods: {
			tapMaker(e) {
				console.log(e.detail.markerId);
				console.log(e);
				let markerId=e.detail.markerId
				this.$emit("clickMark",5)
			}
		},
	}
</script>

<style lang="scss">
	.map {
		width: 100vw;
		height: 100vh;
	}
</style>